<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- for example only -->   
    <script src="../../node_modules/react/umd/react.development.js"></script>
    <script src="../../node_modules/react-dom/umd/react-dom.development.js"></script>
    <script src="../../node_modules/@babel/standalone/babel.min.js"></script>
    <!-- end -->

    <link rel="stylesheet" type="text/css" href="../assets/mui/css/mui.css"/>
    <script src="../assets/mui/react/mui-react.js"></script>
  </head>
  <body>
    <div class="mui-container">
      <h1>Buttons</h1>
      <div id="default-buttons"></div>
      <div id="flat-buttons"></div>
      <div id="raised-buttons"></div>
      <div id="button-sizes"></div>
      <div id="floating-buttons"></div>
    </div>
    <script type="text/babel">
      let Button = mui.react.Button;

      class Buttons extends React.Component {
        render() {
          return (
            <div className="buttons">
              <Button
                variant={this.props.variant}
                size={this.props.size}
                disabled={this.props.disabled}>
                Button
              </Button>
              <Button
                color="primary"
                variant={this.props.variant}
                size={this.props.size}
                disabled={this.props.disabled}>
                Button
              </Button>
              <Button 
                color="danger"
                variant={this.props.variant}
                size={this.props.size}
                disabled={this.props.disabled}>
                Button
              </Button>
              <Button 
                color="dark"
                variant={this.props.variant}
                size={this.props.size}
                disabled={this.props.disabled}>
                Button
              </Button>
              <Button
                color="accent"
                variant={this.props.variant}
                size={this.props.size}
                disabled={this.props.disabled}>
                Button
              </Button>
            </div>
          );
        }
      }


      class ButtonSizes extends React.Component {
        render() {
          return (
            <div>
              <Button
                color="primary"
                size={this.props.size}>
                Button
              </Button>
              <Button
                color="primary"
                variant="flat"
                size={this.props.size}>
                Button
              </Button>
              <Button
                color="primary"
                variant="raised"
                size={this.props.size}>
                Button
              </Button>
              <Button
                color="primary"
                variant="fab"
                size={this.props.size}>
                +
              </Button>
            </div>
          );
        }
      }
      
            
      class FABButtons extends React.Component {
        render() {
          return (
            <div>
              <Button
                variant="fab"
                disabled={this.props.disabled}>
                +
              </Button>
              <Button
                variant="fab"
                color="primary"
                disabled={this.props.disabled}>
                +
              </Button>
              <Button
                variant="fab"
                color="danger"
                disabled={this.props.disabled}>
                +
              </Button>
              <Button
                variant="fab"
                color="dark"
                disabled={this.props.disabled}>
                +
              </Button>
              <Button
                variant="fab"
                color="accent"
                disabled={this.props.disabled}>
                +
              </Button>
            </div>
          );
        }
      }

      
      ReactDOM.render(
        <div className="mui-panel">
          <h3>Default buttons</h3>
          <Buttons />
          <Buttons disabled={true} />
        </div>,
        document.getElementById('default-buttons')
      );


      ReactDOM.render(
        <div className="mui-panel">
          <h3>Flat buttons</h3>
          <Buttons variant="flat" />
          <Buttons variant="flat" disabled={true} />
        </div>,
        document.getElementById('flat-buttons')
      );


      ReactDOM.render(
        <div className="mui-panel">
          <h3>Raised buttons</h3>
          <Buttons variant="raised" />
          <Buttons variant="raised" disabled={true} />
        </div>,
        document.getElementById('raised-buttons')
      );


      ReactDOM.render(
        <div className="mui-panel">
          <h3>Floating Action Buttons</h3>
          <FABButtons />
          <FABButtons disabled={true} />
        </div>,
        document.getElementById('floating-buttons')
      );


      ReactDOM.render(
        <div className="mui-panel">
          <h3>Button sizes</h3>
          <ButtonSizes size="small" />
          <ButtonSizes />
          <ButtonSizes size="large" />
        </div>,
        document.getElementById('button-sizes')
      );
    </script>
  </body>
</html>
